home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / security / portmap_3.shar.Z / portmap_3.shar / Makefile < prev    next >
Encoding:
Makefile  |  1993-11-20  |  3.4 KB  |  114 lines

  1. # @(#) Makefile 1.4 93/11/21 17:36:53
  2.  
  3. ####################################
  4. ### Beginning of configurable stuff.
  5.  
  6. # By default, logfile entries are written to the same file as used for
  7. # sendmail transaction logs. Change the definition of the following macro
  8. # if you disagree. See `man 3 syslog' for examples. Some syslog versions
  9. # do not provide this flexibility.
  10. #
  11. FACILITY=LOG_MAIL
  12.  
  13. # To disable host access control, comment out the following macro definition.
  14. # Note: host access control requires the strtok() and strchr() routines.
  15. # Host access control can also be turned off by providing no access control
  16. # tables. The local system, since it runs the portmap daemon, is always
  17. # treated as an authorized host.
  18.  
  19. HOSTS_ACCESS= -DHOSTS_ACCESS
  20.  
  21. # Comment out if your RPC library does not allocate privileged ports for
  22. # requests from processes with root privilege, or the new portmap will
  23. # always reject requests to register/unregister services on privileged
  24. # ports. You can find out by running "rpcinfo -p"; if all mountd and NIS
  25. # daemons use a port >= 1024 you should probably disable the next line.
  26.  
  27. CHECK_PORT = -DCHECK_PORT
  28.  
  29. # When the portmapper cannot find any local interfaces (it will complain
  30. # to the syslog daemon) your system probably has variable-length socket
  31. # address structures (struct sockaddr has a sa_len component; example:
  32. # 4.4BSD). Uncomment next macro definition in that case.
  33. #
  34. # SA_LEN = -DHAS_SA_LEN
  35.  
  36. # With verbose logging on, HP-UX 9.x leaves zombies behind when SIGCHLD
  37. # is not ignored. Enable next macro for a fix.
  38. #
  39. # ZOMBIES = -DIGNORE_SIGCHLD
  40.  
  41. # Uncomment the following macro if your system does not have u_long.
  42. #
  43. # ULONG    =-Du_long="unsigned long"
  44.  
  45. # Later versions of the tcp wrapper (log_tcp package) come with a
  46. # libwrap.a object library. WRAP_DIR should specify the directory with
  47. # that library.
  48.  
  49. WRAP_DIR= ../tcp_wrappers
  50.  
  51. # Auxiliary object files that may be missing from your C library.
  52. #
  53. AUX    = daemon.o strerror.o
  54.  
  55. # Uncomment the following macro definitions if you are running SYSV.4.
  56. # This won't help much because SYSV.4 uses rpcbind instead of portmap.
  57. #
  58. # CC    = /usr/ucb/cc
  59. # LIBS    = -lrpcsoc
  60. # SYS    = -DSYSV40
  61.  
  62. # Auxiliary libraries that you may have to specify
  63. #
  64. # LIBS    = -lrpc
  65.  
  66. ### End of configurable stuff.
  67. ##############################
  68.  
  69. SHELL    = /bin/sh
  70.  
  71. COPT    = -Dconst= -Dperror=xperror $(HOSTS_ACCESS) $(CHECK_PORT) \
  72.     $(SYS) -DFACILITY=$(FACILITY) $(ULONG) $(ZOMBIES) $(SA_LEN)
  73. CFLAGS    = $(COPT) -O
  74. OBJECTS    = portmap.o pmap_check.o from_local.o $(AUX)
  75.  
  76. all:    portmap pmap_dump pmap_set
  77.  
  78. portmap: $(OBJECTS) $(WRAP_DIR)/libwrap.a
  79.     $(CC) $(CFLAGS) -o $@ $(OBJECTS) $(WRAP_DIR)/libwrap.a $(LIBS)
  80.  
  81. pmap_dump: pmap_dump.c
  82.     $(CC) $(CFLAGS) -o $@ $? $(LIBS)
  83.  
  84. pmap_set: pmap_set.c
  85.     $(CC) $(CFLAGS) -o $@ $? $(LIBS)
  86.  
  87. from_local: from_local.c
  88.     cc $(CFLAGS) -DTEST -o $@ from_local.c
  89.  
  90. lint:    
  91.     lint $(COPT) $(OBJECTS:%.o=%.c)
  92.  
  93. clean:
  94.     rm -f *.o portmap pmap_dump pmap_set from_local core
  95.  
  96. shar:
  97.     @shar README Makefile portmap.c daemon.c strerror.c diffs_wrt_bsd \
  98.     pmap_dump.c pmap_set.c from_local.c pmap_check.c pmap_check.h BLURB
  99.  
  100. diffs_wrt_bsd: portmap.c.bsd portmap.c daemon.c.bsd daemon.c
  101.     -(diff -c portmap.c.bsd portmap.c; diff -c daemon.c.bsd daemon.c) >$@
  102.  
  103. deps:
  104.     @$(CC) -M $(CFLAGS) *.c | grep -v /usr/include |sed 's/\.\///'
  105.  
  106. daemon.o: daemon.c
  107. from_local.o: from_local.c
  108. pmap_check.o: pmap_check.c pmap_check.h Makefile
  109. pmap_dump.o: pmap_dump.c
  110. pmap_set.o: pmap_set.c
  111. portmap.o: portmap.c
  112. portmap.o: pmap_check.h
  113. strerror.o: strerror.c
  114.